/*
 * @Description  : 借阅单
 * @Author       : zhao
 * @Date         : 2022-07-07 11:21:41
 * @LastEditors  : zhao
 * @LastEditTime : 2023-01-12 15:55:00
 */

import request from '@/utils/request'

// 添加借阅单
export function AddBorrowingForm(data) {
    return request({
        url: '/BorrowingForm/AddBorrowingForm',
        method: 'post',
        headers: {
            'Content-Type': 'multipart/form-data'//含有附件的表单提交的Content-Type
        },
        data: data
    })
}
// 获取借阅单列表
export function GetBorrowingForm(data) {
    return request({
        url: '/BorrowingForm/GetBorrowingForm',
        method: 'post',
        data: data
    })
}
// 获取借阅单列表-详情
export function CSGetBorrowingFormDetails(data) {
    return request({
        url: '/BorrowingForm/GetBorrowingFormDetails',
        method: 'post',
        data: data
    })
}
// 获取文件数
export function GetFileNumber(data) {

    return request({
        url: '/GeodatainfoFile/GetFileNumber',
        method: 'get',
        params: data
    })
}
// 删除驳回借阅单
export function UpdateBorrowingFormDetails(data) {

    return request({
        url: '/BorrowingForm/UpdateBorrowingFormDetails',
        method: 'post',
        data: data
    })
}
// 删除驳回借阅单
export function UpdateBtnBorrowingForm(data) {

    return request({
        url: '/BorrowingForm/UpdateBtnBorrowingForm',
        method: 'post',
        data: data
    })
}
// 获取介绍信
export function GetIntroductionLetter(data) {

    return request({
        url: '/BorrowingForm/GetIntroductionLetter',
        method: 'post',
        responseType: "blob",
        data: data
    })
}
// 获取任务书
export function GetAssignment(data) {

    return request({
        url: '/BorrowingForm/GetAssignment',
        method: 'post',
        responseType: "blob",
        data: data
    })
}
// 打印借阅单详情---生成excel
export function DownloadFormDetailExcel(data) {

    return request({
        url: '/BorrowingForm/BSDownloadFormDetailExcel',
        method: 'post',
        responseType: "blob",
        data: data
    })
}
// BS下载地质资料使用申请表
export function BSDownLoadApplicationTable(data) {

    return request({
        url: '/BorrowingForm/BSDownLoadApplicationTable',
        method: 'post',
        responseType: "blob",
        data: data
    })
}
// 用户自主撤销借阅单,只能撤销已提交状态的借阅单
export function BSBorrowingFormRevoke(data) {

    return request({
        url: '/BorrowingForm/BSBorrowingFormRevoke',
        method: 'post',

        data: data
    })
}
// 用户删除订单，（只能删除已驳回，已撤回，已完成状态的订单
export function BSBorrowingFormDelete(data) {

    return request({
        url: '/BorrowingForm/BSBorrowingFormDelete',
        method: 'post',

        data: data
    })
}